package org.skipper.swagger.spring.boot;

import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.stereotype.Component;

/**
 * Created with IntelliJ IDEA.
 * Description:
 *
 * @author shoujian
 * Date: 2020-04-09
 * Time: 3:15 下午
 */
@Component
@ConfigurationProperties(prefix = "voyage.swagger")
public class SwaggerProperties {

    private Docket docket;

    private TagCode tagCode;

    public Docket getDocket() {
        return docket;
    }

    public void setDocket(Docket docket) {
        this.docket = docket;
    }

    public TagCode getTagCode() {
        return tagCode;
    }

    public void setTagCode(TagCode tagCode) {
        this.tagCode = tagCode;
    }

    /**
     * 错误码相关配置
     */
    public static class TagCode {
        private String name;

        @Override
        public String toString() {
            return "TagCode{" +
                    "name='" + name + '\'' +
                    '}';
        }

        public String getName() {
            return name;
        }

        public void setName(String name) {
            this.name = name;
        }
    }

    /**
     * swagger中docket相关配置
     */
    public static class Docket {
        private Boolean enable;

        @Override
        public String toString() {
            return "Docket{" +
                    "enable=" + enable +
                    '}';
        }

        public Boolean getEnable() {
            return enable;
        }

        public void setEnable(Boolean enable) {
            this.enable = enable;
        }
    }


}
